package com.javayh.server;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Dylan Yang
 * @Title: TestApi
 * @ProjectName demo
 * @Description: TODO
 * @date 2018/11/1721:33
 */
@RestController
public class TestApi {

    @Value(value = "${server.port}")
    private String port;

    @GetMapping(value = "getApi/{name}")
    public String getApi(@PathVariable(value = "name") String name){
        return "恭喜您:  "+name+"  服务注册成功！";
    }

    @GetMapping(value = "getTest")
    public String getApi(){
        return "恭喜您服务调用成功"+port;
    }

}

